package com.redis.controller;

import com.alibaba.fastjson.JSONObject;
import com.redis.test.RedisCacheTest;
import exam.common.Result;
import exam.file.domain.UFile;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Xiongx
 * @version 1.0
 * @date 2021/4/28 17:50
 * @since JDK 1.8
 */
@RestController
@Api(tags = {"redis测试模块"})
public class RedisControllerTest {

    @Autowired
    private RedisCacheTest redisCacheTest;

    @ApiOperation("redis测试")
    @PostMapping("redistest")
    public JSONObject redisController(){
        List<UFile> uFiles=redisCacheTest.selectUFileList();
        return Result.successObject(uFiles);
    }


}
